Conventionally, there is an apparatus that, for example, divides input music data on the basis of frequency ranges, and converts the divided signals into frequency domain data to encode it, thereby compressing the music data.
The conventional technique, however, divides a signal on the basis of fixed frequency ranges determined in advance, and encodes the divided signals. Thus, there is room for improvement in, for example, the efficiency of data compression.
Therefore, it is an object of an exemplary embodiment to provide a data compression technique that can improve the efficiency of data compression.
To achieve the above object, the exemplary embodiment employs the following configurations.
An exemplary embodiment is a data compression apparatus for compressing input compression target data to generate compressed data. The data compression apparatus includes a conversion unit, a block generation unit, and a compressed data generation unit. The conversion unit converts the compression target data into a plurality of pieces of frequency domain data. The block generation unit generates a plurality of blocks by, on the basis of the plurality of pieces of frequency domain data, dividing a data sequence in which the plurality of pieces of frequency domain data are arranged into a plurality of blocks such that separation positions of the blocks are variable. The compressed data generation unit generates the compressed data by compressing, on a block basis, the pieces of frequency domain data included in the blocks generated by the block generation unit.
On the basis of the above, it is possible to generate blocks such that the separation positions of a data sequence is variable, and compress the data on a block basis. This makes it possible to, for example, efficiently compress data.
In addition, in another configuration, the block generation unit may generate the plurality of blocks on the basis of the characteristics of the plurality of pieces of frequency domain data.
On the basis of the above, it is possible to generate a plurality of blocks on the basis of the characteristics of a plurality of pieces of frequency domain data. Here, “generate a plurality of blocks on the basis of the characteristics of a plurality of pieces of frequency domain data” means the generation of a plurality of blocks on the basis of the properties of pieces of data obtained by reading the pieces of data, not the generation of a plurality of blocks with a pattern determined in advance.
In addition, in another configuration, the block generation unit may generate the plurality of blocks on the basis of the characteristics of the plurality of pieces of frequency domain data with respect to a certain number of pieces of the compression target data.
On the basis of the above, it is possible to generate a plurality of blocks on the basis of, with respect to a frame including a certain number of pieces of compression target data, the characteristics of a plurality of pieces of frequency domain data included in the frame. This makes it possible to vary the separation positions of the blocks depending on the frame.
In addition, in another configuration, the block generation unit may generate the plurality of blocks on the basis of a similarity between the plurality of pieces of frequency domain data.
On the basis of the above, it is possible to generate a plurality of blocks on the basis of a similarity between a pieces of data, and compress each block. Here, the similarity indicates that the pieces of data are similar from a certain point of view, and indicates, for example, that the values of the pieces of data are the same or the difference between the values is a predetermined value or less, or that the numbers of bits for representing the pieces of data are the same or are in a predetermined range.
In addition, in another configuration, the block generation unit may generate the plurality of blocks such that, in the data sequence of the plurality of pieces of frequency domain data, a plurality of pieces of data having different values but having a similarity are included in one of the blocks.
On the basis of the above, it is possible to include pieces of data having different values but having a similarity in the same block to generate the block.
In addition, in another configuration, the block generation unit may categorize the pieces of frequency domain data in accordance with values thereof, and may generate the plurality of blocks on the basis of the categories.
On the basis of the above, it is possible to categorize pieces of frequency domain data, and generate blocks in accordance with the categories. This makes it possible to categorize pieces of data into some types, and generate blocks on the basis of the types.
In addition, in another configuration, the block generation unit may generate the plurality of blocks so as to include any of the pieces of frequency domain data of the same category in the same block.
On the basis of the above, it is possible to include pieces of data belonging to the same category in one block. This makes it possible to generate blocks more suitable for data compression, and compress the blocks.
In addition, in another configuration, even when one of the pieces of frequency domain data and one of the blocks belong to different categories, if the piece of data and the block satisfy a predetermined condition, the block generation unit may include the piece of data in the block.
On the basis of the above, even when a piece of data and a block belong to different categories, if the piece of data and the block satisfy a predetermined condition, it is possible to include the pieces of data in the block. This makes it possible to, for example, prevent an increase in the number of blocks, and therefore prevent an increase in the data size of the entire data when compressed. Here, the predetermined condition may be a condition determined taking into account the case where the piece of data is included in the block and the case where the piece of data is not included in the block.
In addition, in another configuration, the block generation unit may generate the plurality of blocks on the basis of a continuity between the plurality of pieces of frequency domain data when arranged.
On the basis of the above, it is possible to generate blocks on the basis of a continuity between pieces of data. Here, the continuity between pieces of data may be, for example, the fact that the values of a piece of data and a piece of data adjacent thereto or at a position in a predetermined range therefrom are continuous (the difference between the pieces of data is a predetermined value or less).
In addition, in another configuration, the block generation unit may generate the plurality of blocks on the basis of the number of bits for representing each of the pieces of frequency domain data.
On the basis of the above, it is possible to generate blocks on the basis of the number of bits of each piece of data. This makes it possible to generate blocks and compress data by a simple method.
In addition, in another configuration, the block generation unit may assemble, in one of the blocks, any of the pieces of frequency domain data having the same number of bits for representing each of the pieces of frequency domain data. The compressed data generation unit may compress the pieces of frequency domain data included in each block by removing unnecessary bits so as to leave bits for representing each piece of data included in the block.
On the basis of the above, it is possible to efficiently compress data by a simple method such as assembling pieces of data having the same number of bits, and removing unnecessary bits. Further, it is also possible to accurately reconstruct data before being compressed.
In addition, in another configuration, even when one of the pieces of frequency domain data and one of the blocks have different numbers of bits for representing each of the pieces of frequency domain data, if the piece of data and the block satisfy a predetermined condition, the block generation unit may include the piece of data in the block.
On the basis of the above, even when a piece of data and a block have different numbers of bits, if the pieces of data and the block satisfy a predetermined condition, it is possible to include the pieces of data in the block. This makes it possible to, for example, prevent an increase in the number of blocks, and therefore prevent an increase in the data size of the entire data when compressed.
In addition, in another configuration, taking into account a size of the compressed data compressed when one of the blocks is divided and the size of the compressed data compressed when the block is not divided, the block generation unit may determine whether or not the block is to be divided, and if the block generation unit has determined that the block is to be divided, the block generation unit may divide the block.
On the basis of the above, it is possible to, taking into account the size of data when a block is divided and the size of the data when the block is not divided, determine whether or not the block is to be divided. This makes it possible to generate blocks by a manner of dividing a block that results in a small data size, and compress the blocks, which makes it possible to increase the compression ratio.
In addition, in another configuration, if a size of the data sequence compressed when separated at a particular position is smaller than the size of the data sequence compressed when separated at a position different from the particular position, the block generation unit may separate the data sequence at the particular position.
On the basis of the above, it is possible to generate blocks by separating data at a separation position that results in a higher compression ratio when the data is compressed, and compress the blocks.
In addition, in another configuration, the block generation unit may generate, on a block basis, decompression information used to decompress the blocks.
On the basis of the above, it is possible to generate decompression information on a block basis, and decompress each block using the decompression information.
In addition, in another configuration, the decompression information may be information common to the pieces of frequency domain data included in each block.
On the basis of the above, it is possible to generate information common to pieces of data as decompression information, and decompress the compressed data using the information.
In addition, in another configuration, the block generation unit may generate the plurality of blocks on the basis of a size of the decompression information.
On the basis of the above, it is possible to generate blocks, taking into account the size of decompression information used to decompress compressed data.
In addition, in another configuration, if a size of one of the blocks when the block is not divided is larger than a size of two blocks that are obtained by dividing the block and include the decompression information increased when the block is divided, the block generation unit may divide the block.
On the basis of the above, it is possible to, taking into account decompression information added when a block is divided, determine whether or not the block is to be divided. This makes it possible to divide a block by a method that results in a smaller size, which makes it possible to increase the compression ratio of the entire data.
In addition, in another configuration, the block generation unit may divide the plurality of pieces of frequency domain data into the plurality of blocks such that, if the plurality of pieces of frequency domain data are arranged in accordance with frequencies thereof, separation positions of the frequencies are variable.
On the basis of the above, it is possible to generate variable blocks, instead of generating fixed blocks in accordance with frequency ranges, and compress the blocks. This makes it possible to efficiently compress data.
In addition, in another configuration, the block generation unit may include a determination unit and a generation unit. The determination unit determines whether or not one of the pieces of frequency domain data arranged in the data sequence is to be included in a current block. The generation unit, if the determination unit has determined that the piece of frequency domain data is to be included in the current block, includes the piece of frequency domain data in the current block, and, if the determination unit has determined that the piece of frequency domain data is not to be included in the current block, generates a subsequent block and includes the piece of frequency domain data in the subsequent block.
On the basis of the above, it is possible to generate blocks by processing pieces of frequency domain data in order.
Another embodiment is a data compression apparatus for compressing input compression target data to generate compressed data, the data compression apparatus. The data compression apparatus includes a conversion unit, a block generation unit, and a compressed data generation unit. The conversion unit converts the compression target data into a plurality of pieces of frequency domain data. The block generation unit, on the basis of characteristics of the plurality of pieces of frequency domain data, generates a plurality of blocks such that the number of the pieces of frequency domain data included in each block is variable. The compressed data generation unit generates the compressed data by compressing, on a block basis, the pieces of frequency domain data included in the blocks generated by the block generation unit.
Another embodiment is a data decompression apparatus for decompressing compressed data to generate decompressed data. The compressed data includes a plurality of blocks having a plurality of pieces of compressed frequency domain data, and information for specifying the number of the pieces of compressed frequency domain data included in each block. The data decompression apparatus includes an extraction unit and a decompression unit. The extraction unit extracts each block included in the compressed data. The decompression unit, on the basis of the information for specifying the number of the pieces of compressed frequency domain data included in the block, decompresses the compressed data on a block basis to generate a plurality of pieces of frequency domain data, to thereby generate the decompressed data.
Another embodiment is a data compression/decompression system for compressing input data to generate compressed data and decompressing the compressed data, the data compression/decompression system. The data compression/decompression system includes a conversion unit, a block generation unit, a compressed data generation unit, an extraction unit, and a decompression unit. The conversion unit converts the input data into a plurality of pieces of frequency domain data. The block generation unit generates a plurality of blocks by, on the basis of the plurality of pieces of frequency domain data, dividing a data sequence in which the plurality of pieces of frequency domain data are arranged into a plurality of blocks such that separation positions of the blocks are variable. The compressed data generation unit generates the compressed data by compressing, on a block basis, the pieces of frequency domain data included in the blocks generated by the block generation unit. The extraction unit extracts each block included in the compressed data. The decompression unit decompresses the compressed data by decompressing the compressed data on a block basis to generate the plurality of pieces of frequency domain data.
Another embodiment is a data structure of compressed data obtained by compressing compression target data. The compressed data includes a plurality of blocks. Each of the plurality of blocks includes a region containing a plurality of pieces of compressed data, and a block header region containing information for decompressing the pieces of compressed data.
The data structure may further include a frame header region including information for specifying information regarding the block header region.
It should be noted that another embodiment may be a data compression program to be executed by the data compression apparatus, or may be a data compression system including a plurality of apparatuses. Alternatively, another embodiment may be a data compression method. Yet alternatively, another embodiment may be a data decompression program to be executed by the data decompression apparatus, or may be a data decompression system, or may be a data decompression method.
The exemplary embodiment makes it possible to generate blocks such that the number of pieces of data included in the blocks are variable, and compress the pieces of data on a block basis.
These and other objects, features, aspects and advantages of the exemplary embodiment will become more apparent from the following detailed description of the exemplary embodiment when taken in conjunction with the accompanying drawings.